home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
windows
/
qkdial11.zip
/
QKDIAL.WAS
< prev
Wrap
Text File
|
1992-12-17
|
9KB
|
154 lines
;QUIKDIAL v. 1.1 Allows a first quick pass through the dialing queue
;****************************************************************************
;* *
;* QUIKDIAL.WAS *
;* Copyright (C) 1992 Datastorm Technologies, Inc. *
;* All rights reserved. *
;* *
;* Purpose: Dials a queue of numbers from the Dialing Directory once *
;* without pausing between attempts, then falls back to the *
;* default pause. This offers essentially the same functionality *
;* as pressing the Space Bar between calls in PROCOMM PLUS for *
;* DOS. You can quickly sample a queue of busy numbers, then *
;* revert back a long pause so your own phone line isn't *
;* tied up constantly. *
;* *
;* This ASPECT SCRIPT is intended only as a sample of ASPECT programming. *
;* DATASTORM makes no warranty of any kind, express or implied, including *
;* without limitation, any warranties of merchantability and/or fitness *
;* for a particular purpose. Use of this program is at your own risk. *
;* *
;* Author: Chuck Spohr *
;* *
;****************************************************************************
;****************************************************************************
;* GLOBAL VARIABLES *
;****************************************************************************
integer Max, CPause
;****************************************************************************
;* *
;* MAIN *
;* The Main Procedure simply calls its supporting routines to initialize, *
;* dial and finally, clean up. *
;* *
;* Calls: Initialize, DialQ, Cleanup *
;* Modifies globals: Max, CPause *
;* *
;****************************************************************************
proc Main
Initialize()
DialQ()
Cleanup()
endproc
;****************************************************************************
;* *
;* INITIALIZE * *
;* The Initialize procedure first checks to see if the script has been *
;* chained from a previous script, and exits if it has. This is necessary *
;* for the Cleanup procdure to work correctly. Initialize then sets *
;* records the existing Call Pause and Dial Attemps settings, and sets *
;* them to 0 and 1, respectively. *
;* *
;* Calls: Cleanup *
;* Called by: Main *
;* Modifies globals: Max, CPause *
;* *
;****************************************************************************
proc Initialize
if $CHAINED
exit ; Quit if a script is already running
endif ; (Necessary for Cleanup procedure)
when userexit call Cleanup ; Intercept exit attempt by user
set aspect spawn ON ; Allow other scripts to run
fetch dialdir callpause CPause ; Obtain Pause Between Calls setting
fetch dialdir maxdial Max ; Obtain current Max Dial Attempts setting
if Max > 99 ; Can't set it over 99
Max = 99
endif
set dialdir maxdial 1 ; Set these values temporarily
set dialdir callpause 0
endproc
;****************************************************************************
;* *
;* DIALQ *
;* The DialQ procedure opens the Dialing Directory and waits for the user *
;* to begin Dialing. If the user closes the directory before dialing, *
;* we'll sense it and shut down the script. When the user clicks Dial, *
;* DialQ dials the Queue of entries, checks see if we have carrier, *
;* restores the original Dial Dir settings, and tries again if necessary. *
;* *
;* Calls: Cleanup *
;* Called by: Main *
;* Modifies globals: Max, CPause *
;* *
;****************************************************************************
proc DialQ
if not $DIALDIR ; If Dialing Directory is not already open,
dialdir ON ; open it
while 1 ; Wait until user Dials
if $DIALING
exitwhile
elseif not ($DIALDIR || $DIALING) ; If user closes Dial Dir before
Cleanup() ; dialing, clean up and exit
endif ; script
endwhile
else
dialqueue ; Dial the currently queued numbers
endif
while $DIALING ; Wait until dialing stops
endwhile
set dialdir maxdial Max ; Restore Pause and Max Dial Attempts
set dialdir callpause CPause
pause 2 ; Pause to let carrier go high
if not $CARRIER ; If we didn't make a connection,
dialqueue ; try again with original settings
while $DIALING ; Wait until dialing stops
endwhile
endif
Cleanup() ; Exit!
endproc
;****************************************************************************
;* *
;* CLEANUP *
;* The Cleanup procedure is called whenever a user attempts to exit, or *
;* when the MAIN has finished. It first sets the Max Dial Attempts and *
;* Pause Between Attempts setting back to their default values, then if the *
;* Action Bar is active, it runs this script again to make it the current *
;* script rather than the one in the last Dialing Directory entry dialed. *
;* *
;* Calls: none *
;* Called by: Main, WHEN USEREXIT *
;* Modifies globals: none *
;* *
;****************************************************************************
proc Cleanup
set dialdir maxdial Max ; Restore Pause and Max Dial Attemps
set dialdir callpause CPause
dialcancel ; Cancel any dialing that might be occuring
dialdir OFF ; Close Dialing Directory
if $ACTIONBAR ; This will restore "QUIKDIAL" as the
chain $SCRIPT ; current script on the Action Bar
endif
exit ; Quit the script
endproc